package com.guoyu.gserv.entity;

import java.io.Serializable;
import java.sql.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
public class Message implements Serializable {
	private int messId;
	private Date sendTime;
	private String inUser,content;
	private UserInfo1 sendUser;
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public int getMessId() {
		return messId;
	}
	public void setMessId(int messId) {
		this.messId = messId;
	}
	public Date getSendTime() {
		return sendTime;
	}
	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	@ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="sendUserId")
	public UserInfo1 getSendUser() {
		return sendUser;
	}
	public void setSendUser(UserInfo1 sendUser) {
		this.sendUser = sendUser;
	}
	public String getInUser() {
		return inUser;
	}
	public void setInUser(String inUser) {
		this.inUser = inUser;
	}

}
